system("cp $tmpfile $copypath/$att_file") && die "Could not cp $tmpfile to $copypath/$att_file - $!\n";