file.h thread safe now