better key error log