Dialog boxes for error handling added