Catching output with console log