Write log in CreateTask method.