Fourth revision

Extracted several methods such as concatenating/splitting the digest,
producing the key, process the filename.