Tornado working, but only with flask