Updating cap3 stop task to check if process exists before attempting kill