Thread safe outfile-id; other file-id need more cross debugging