Fixed condition to set absolute path. Added absolute path to pid_dir