added guard against relaunching processes for studies that are failing and changed filepaths for err files to a processing_messages subdir