fixed error handling bug
implemented templated files for files lists