add build/bundle script, fixed a segfault if tcpserver couldnt start