Added error manaement and way to restart at a particular subfolder