Add option to append data to a file