strip line when reading files
fix bug in processing multiple input