Detach all peripherals on computer close