Implemented optional logfile mode with error supression.