review duplicated completefile() call