fix 'ENV' default development .
add err handler .
add test code .