use spawn to run long-time task and real-time display log