use python scripts to detect and fix some errors in preamble parts of files (tested)