Here’s another question/answer from “The Baking Answer Book” by Lauren Chattman.
QUESTION: Are there other secrets to better-looking bar cookies.
ANSWER: I often line my baking pan with nonstick aluminum foil before filling it with cookie dough. So instead of having to dig out that first brownie with a spatula (and probably destroying it in the process), I just lift the foil from the pan when the cookies are cooled and slice them into neat squares.
The best bar cookies are slightly underbaked in the center. If they’re not, then the bars closest to the edge of the pan will definitely be overbaked. But underbaked bars are very soft and can crumble when cut. To make neat squares, freeze the cooled but uncut cookies for 15 minutes to firm them up and then cut straight down with a sharp chef’s knife rather than dragging the knife across the bars.