fixing some weirdness in fileops.