Added error message boxes instead of just messages boxes