Added dialog boxes for errors