add more error catch