Problem with this approach is that if one writer fails to succeed, you won't write to the other. You probably need to move the try catch to inside the loop, log the exception for failure & continue.