fileguard on read and write