remove thread.

writeToFile is already invoked in background thread.