now using a config file for logging to the terminal and log file --- Also added custom exception for a missing token.