handling empty data files better