Whops, was still writing the file twice.