Modify function readAll

interval call -> recursive call
Add an error message
Add semicolons
Initialize variables of $scope if disconnected
Change version