fix a bug in sysfile.c