Bug Fix log file

Tried to write to log file before data folder was created :(