Replaces puts with console.log