fix bug about append taskId behind the command and use Generic Type in AppHandler