added error checking for filter and a command line help