fix nohup bug and improve threads speed