#if 0 the write exception code for the moment. I need to work out why