Start adding error handling functionality