Fix unexpected exit when KEEP_FILE is set

Signed-off-by: kfei <kfei@kfei.net>