Asserting file open success in loadfile