added support for html includes, and closed open file discriptors