Encrypt file functionality works