support destination of directory only
debug option
switch from tempfile to checksum cache; think about robust alg