# The log file couldn't be written

What "couldn't write the log" means and how to fix it.

```text
error: couldn't write the log to logs/run.log: No such file or directory (os error 2)
hint: Check that the folder exists and that you can write to it.
```

## Why it happens

The file given with `--log-file`, `logFile` under `[run]` in `axle.toml` or `AXLE_LOG_FILE` couldn't be created, so Axle didn't start the run. If writing to it fails later, such as on a full disk, Axle reports it when the run ends and exits with 1, unless a script already failed with its own exit code.

## How to fix it

Create the folder, or choose another place. A relative path after `--log-file` or in `AXLE_LOG_FILE` is relative to the folder Axle was started in, and one in `axle.toml` to the repository's root.
