Added loggin in case of task creation error.