Fixed Error-Handling and CommonJS