Handle errors in package