log sql only in development
add error images
improve exception handling, utf-8 fix, extract core extentions