problem with writing to log directory (reopen #33)