More elegant error handling in resetThumbnail.jsp