Improved the logging and fixed the test.js implementation