Corrected test for failed file open(s).