Remove unused variable
Add logfile