Fix the add and rm commands to fail if no patch is applied