diff --git a/sched/delete_file.C b/sched/delete_file.C
index 62813c3176..f8fc6b549c 100644
--- a/sched/delete_file.C
+++ b/sched/delete_file.C
@@ -41,13 +41,12 @@ SCHED_CONFIG config;
int delete_host_file(int host_id, const char* file_name) {
DB_MSG_TO_HOST mth;
- char msg_text[400];
- sprintf(msg_text, "%s\n", file_name);
+ sprintf(mth.xml, "%s\n", file_name);
+ sprintf(mth.variety, "delete_file");
int retval;
mth.clear();
mth.create_time = time(0);
mth.hostid = host_id;
- strcpy(mth.variety, msg_text);
mth.handled = false;
retval = mth.insert();
if (retval) {