more verbose output and path fix

fix an error when path ends with a '/'
only call `self.get_all_hosts()` once and assign it to some temporary varaible.