refactored the outputting to files and added bool options to output certain params only