Error Logging Fix