Added alert on error