remove comment and invalid line