added debug option for raw output