added check for pid file path