Maybe you should choose files by their location (i.e. folder name) and only treat files you recognize. That way the script does not break when adding other files to the ROMFS in the future.