fixed flat_assertions, now uses temporary files so it does not hold all of the assertions in memory at any point