fixed the bug due to the LyX export - it creates each chapter file with the header of \documentclass … etc.