writing file and about to submit