pinMode: add an error message in the callback