add fgets and fputs in native.c