Modified digest check to create file if it doesn't exist.