Adding debug mode for server side