Completed Line/ File input processing

not tested jet