export function

Generic Function to Export Output to Files