update api to serve most recent file in a given directory.