I think you can escape [] brackets by adding two bracket like this
console.print("Loading file [[foo.bar]]", style="red") and then output is ---> Loading file [foo.bar]