add catch block avoid program crash