Dying dog gets a second chance at life