Psychiatric factors affecting recovery after a long term treatment program for substance use disorder