file write method testing complete