added file-appending demo