test file i/o