I think we need extract path searching and checking code from check_availability and re-use it in invoke() method as well.
I think we need extract path searching and checking code from check_availability and re-use it in invoke() method as well.