Fixed bug with error messages, added validation for presence of image