Add error logging to npm and bower collectors