expose error log middleware