Put the repeat option checking code a little forward to avoid repeat logic.
Attach a file by drag & drop or click to upload