run method to create the file and close it afterwards
typo in import sys