Re-factoring :- Moved code for handling output to log-files in file_output_helper.rb