More modular file copy.
Fixed checksum function.