Added error to console when submit is not successful