Added print debug statement
Fixed timing issues