error ouput improved