Handle permission error gracefully