added a line to escape when the file is empty (i think)