You are right about that scenario. However non zero length collected_files is only a partial check. Updating.