replace input debug couts with logging and remove the DEBUG #define