# Error in file(file, ifelse(append, "a", "w")) : cannot open the connection

**URL:** <https://forum.biobakery.org/t/error-in-file-file-ifelse-append-a-w-cannot-open-the-connection/1482>\
**Category:** MelonnPan\
**Created:** [January 4, 2021, 8:29am UTC](https://forum.biobakery.org/t/error-in-file-file-ifelse-append-a-w-cannot-open-the-connection/1482 "2021-01-04T08:29:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny973](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/danny973/32/471_2.png) [@danny973](https://forum.biobakery.org/u/danny973)\
**Post date:** [January 4, 2021, 8:29am UTC](https://forum.biobakery.org/t/error-in-file-file-ifelse-append-a-w-cannot-open-the-connection/1482/1 "2021-01-04T08:29:25Z")

</div>

hello, i received an error:

```auto
Error in file(file, ifelse(append, "a", "w")) :
  cannot open the connection

```

while running the melonnpan train.

if anyone have any solution for this? thanks a lot!

---

<div class="post-metadata">

**Author:** ![danny973](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/danny973/32/471_2.png) [@danny973](https://forum.biobakery.org/u/danny973)\
**Post date:** [January 9, 2021, 3:42am UTC](https://forum.biobakery.org/t/error-in-file-file-ifelse-append-a-w-cannot-open-the-connection/1482/2 "2021-01-09T03:42:58Z")

</div>

I’ve solved the problem by changing the output directory from getwd() to the absolute path
