Fix failing import
Better use available function which block properly
only evaluate when list command is used
Adding initial tests