added debug mode for no processing