Better definition of the file API