Add error handling upon task creation