adding try catch on firebase connection