better handling for test writes