Fixed typos, logging errors via Agent#error