use elif and else, to optimize logic and raise error for better debug and notification
use elif and else, to optimize logic and raise error for better debug and notification