Better algorithm use error dialog