added handling with empty hosts file