Added error dialog in main activity.