add graceful and make sense exception handle, would catch the first error get threw