Added error reporting with nice location information.