add resolve-hostname and some loggings