added option to make log files or not
first draft done