Added wait command to updatedReposity function