Check the program logic to see if the code is writing the data to the file.
Add some print statements as needed to show the logic flow.