use err.h everywhere