fix a small bug in file module.