Fixed autoincrement, log file name issue