Write file in test program