Prevent to add files to list more than once

All added files have been listed, it done there.
Don't go next iteration in that loop.

Signed-off-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>