Do not create a thread when a temporary file need to be flushed, closes #21.