removed extraneous prints
Cleaning up file handling