Dumps output into a log file