add further error checking to file transclusion