added debug option to disable processing