made input name and output file name generic based on an input string