Implement error logging system