output file and line when printing error

- saves numeric block id in named component id
- if no chunk patterns are given, chunk id is set to NULL
- use id = NULL also for tests