add try catch for onPictureTaken