Improved dump.py