fix issue when using  and opening empty files