Fixed issue with `pidfile` option from cmdline.
Little refactor.