Updates for debugging

1. compress output files to save disk space
2. make filename formatting more consistent
3. move debug funcs to a separate file debug.py