Add Error class
index.js instead of lib.js