Fix error in single file processing. Fixes #314