Move empty file hack to dedicated method