Added pid file, logging to file and exit statuses