Did you update from firmware 1011, or from an earlier firmware?
Does the file system appear as corrupted immediately upon the module booting after the update to 1012, or only after writing a new main.py file? (You can use ATFS INFO to check; or use ATFS LS, or os.listdir(), etc. to see if files are visible.)
When you say the firmware must be reloaded to make the file system appear again, are you reloading the 1012 firmware, or another version?