Detect empty input files properly.