add script to verify if we may enter the preremove stage