Updated rescue handling and added an output message