add err handler in develop mode