Added mkdir to log file check. Not ideal...