Fix data dump saving logic; adjusted tests.