Check the return value of QFile::open()