Added error handling by modal windows