bugfix: template files are locked due to the input stream is not closed.
add ignore items