Reduce warnings for invalid file handle tests.