Updted remove-install with better file handling logic