track analysis connections, make sure to end them, flushing pending data to the file - also fix and move some stuff
track analysis connections, make sure to end them, flushing
pending data to the file - also fix and move some stuff

cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo