better error reporting during build