py3k fix (raw_input)
Add check on deadlocked flows