Split printfs on newlines when logging to console

newlines are escaped in the terminal when logged by console.log