Fixed exception handling in Logger
-CODE: Fixed the exception handling in Logger's getProgramDir().