Adding debug mode for models