split error functions from \log into new \error util