Added return code validation and delayed exception throwing to not interrupt legacy flow.