Log which file we're reading keys and certs from, and refactor the code a bit in preparation for other work