database_source not closed after reading to extract previous simulation data