added file write test