Consistently check for the 'openPgpFileNameOnly' variable before trying to use it.