remove out of memory, add temporary database file