force test case failure if file cannot be written