Create separate mechanism to handle errors