Correct call to os.remove
Call remove_unmanaged_hooks from cpthook