fixes #63

i cant verify if it works from here
moved the return stream to the proper place,
removed the return(inputfile)