Write log file to response