showing error message when the generator sometimes does not produce results