test files in routine; close files