Added error dialog alert and comments.