fix warning and uncomment log