add better error logging to common.js