- still trying to flush file contents on exit()