Test error logging