A while(!exit) for freeling api