fixed delete_pid_file bug