Add validation for empty file