log.cpp: partially implemented log filename creation (output directory is still missing)