-some minor changes, logs now get closed and devices get properly unmounted