add permission and error handling