make parse_log.py more robust