Improve error checking on profile picture creation