minor change to add an error logger