main using f-in f-out file overwrites to blank file