added hosts list file option
fixed wrong variable name and modified poor expressions