throw exception if using addDirectory() before addAdapter()