added file.close() to original file instead of.py~