finish writing off main thread