Working on CLI

Just implement filter and few more error checks