Adds a --clear_logs flag to clear logs when needed