avoid two calls to the file library