import os p = r"c:\Users\Administrator\Desktop\polymarket-5min-15min-1hour-arbitrage-trading-bot\btc-binary-VWAP-Momentum-bot\logs\bot.log" if os.path.exists(p): with open(p, "r", encoding="utf-8", errors="replace") as f: lines = f.readlines() for line in lines[-40:]: print(line.rstrip()) else: print("NOT FOUND:", p)