Added some error handling to the SubscriptionFunctions.cs constructor