And also remove the file if it's empty