Fix y.
Put console.log in logfile, kill console.error.
Check for both flags.