File.foreach return \n. has to remove it.
fix valend bug.
param is nil?