Improved JS console logging