Some modification in waitwait.py functionality. Also added in debug mode to waitwait.py