bug fixes to folders and ileSystem, better error checking