add try/catch to enable mock testing outside of a chrome extension