make sure isValid is updated after the file move