also extract the path to the file in a variable before passing it for better readability.