Fixed possible NullPointerException in EncryptedFileFactory