database dump function added
better http error response