only touch the file if format successfully