implemented error logging throughout the rest of the bot