added global request fail handling
improved kojac json errors
added before_process and after_process hooks