Fixed code syntax error when the data file is empty.