Bug: Cannot write in log if folder does not exist