Added logic to write solr file.