Improve election creation and file scanning reliability