1)implemented validateAndCreateJournalDir function
2)made some code const-correct