Updates to how the lastError is retrieved in appsquare app