fix formatting with logging to file