can pass file, but multithread has problem