Finally working
removed ip settings. Tornado listens on every address
change program code
fixed bug with constant. Now using globals