clean implementation of age of file, and added downloadIfOlder and jsonFile option