writing only works on the first try for any given run