Added file stats in append option, function to check if file exists and is in the right format.