bugfix: pid file was not created correctly on startup. closes #6338