change default error log level to error > so log generic errors by default in production
add check to see if error has already been logged