split writer into 2 files, need to avoid race conditions