stip lines and ignore dirs