photo error handling