Start to implement error handling