Tried to improve error output a bit.