fix the mutiprocessing problem.
auto write to database/ stupid!!!