Maybe after this line we need to do something like this:

```ruby
FileUtils.mkdir_p(directory)
```
Because if the user has not created the directory it will throw an exception.