Changed db layout dir: same as output file, a weekly directory is created. other improvs