Close file in test.