We investigated the impact of sample preparation on the glassy dynamics of thin films of poly(4chlorostyrene), a polymer whose molecular mobility is particularly sensitive to changes in the specific volume. Samples were obtained by spincoating, the technique most commonly used to prepare thin organic layers, which consists of pouring dilute polymer solutions onto a plate rotating at a high rate. Our experimental results demonstrate that filtering the solutions before spincoating affects the value of the segmental relaxation time of the as-prepared films. Thin polymer layers obtained via filtered solutions show accelerated segmental dynamics upon confinement at the nanoscale level, once below 100 nm, while the samples obtained via unfiltered solutions exhibit bulk-like dynamics down to 15-20 nm. We analyzed these results by means of the cooperative free volume rate model, considering a larger free volume content in thin films obtained via filtered solutions. The validity of the model predictions was finally verified by measurements of irreversible adsorption, confirming a larger adsorbed amount, corresponding to a higher specific volume, in the case of samples obtained via unfiltered solutions. Our results prove that filtering is a crucial step in the preparation of thin films, and it could be used to switch on and off nanoconfinement effects.