Added checking if input folder exists.