the script can handle empty files, it skips them