Close log and disable debug