fix bugs in function copy
add some print functions for debug
update server.c
update utils.h