added error handling for when user denies access