use geteuid syscall as well
fix rename'ing to local device