add localmap method
allow for output capture in p.run
make sure exceptions are logged