added a writer to try and prevent blocking