added support for empty folder