Making some corrections to previous commit to allow loading of files stored in folders