added file text file write test function