added log-level support to Pd