only set flags if they are defined
minor: prepare log file on travis