set log and pid directory to log_dir