fixing restore issue when presence is enabled , also fixing issue with error callback
adding generated files