fix empty file don't exit after display

empty file can't properly display and don't exit thereafter (my machine is ubuntu14.04)