Do not override variable in current scope

fix breakage introduced by commit #db2e91d
use logger instead of calling warn()
avoid warnings in resolv()

small fix to avoid the warnings reported in http://forge.fusioninventory.org/issues/2193
use return to exit function, not next