Make logger an object
Properly throw requirejs errors