handling error in filter

handling errors when trying to filter
adding a couple more debug statements