ADDED: sudo mode check