core: fix typo
core: use exceptions at file processing