create logger class. Add exception handling