trying to write to log file