adding check to see if output folder exists