OPT: updated generate_output_file to address issue #85 and also printv to print in color