add pid directory creation