Be sure to hash the local filename, since it may be different than
expected.
Don't try to retry close()

The POSIX guidance to retry close() on EINTR may be dangerous on
Linux. See https://lwn.net/Articles/576478/