clean input and parser from dir