Added log option to deactivate console.log