Update util.cpp

Fixed ftp thread. It will now terminate at end of program