fixed bug: ordering service run and pid directory creation