Remove logging fix error handling