Use Digest#file if it's available