Add dedicated thread for writing errors into disk.