added print statement in debugging mode