next round of improvement: fix the empty file