tried to improve the error output