switch all remaining checks for FILE_OPENED to FMODE_OPENED