Move stat and checksum function into FileInfo