add defense for zero size file