Add option to set working dir specifically.
Improve open log handle detection.
Docs update.