OSError exception handling when output/input folder does not exist