added try/catch to getSubFolders