Improvements: Uses TRUNCATE for increased performance when wiping huge DB tables rather than DELETE. Now getting gateway and tapid from log filename. Also some other minor changes.