improved profile picture upload error handling