Changed variable name of open input file to 'fin'.