Added console log for debug