changed all codes in fileops.c to libuv api