fix detectFile; fix host pattern;