Looks like extension of file can be only ".exe", is it right :? If it isn't exe @file_on_target isn't correctly initialized.