fixing bug in setup_logs