pdl.py: added basic logging