check for errors before building the package