handle case with emply file