Use require_dependency for safe load
Remove unused variable
Fix require solr plugin before its part