Add some checks and fix reboot after uninstalling recovery

This commits introduces some checks to determine if recovery is previously installed or not.

Signed-off-by: Rachit <rachit@rachit-alienware17.(none)>