add tests around the file api