now checks for errors as well as warns