Corrected preference the path to the directory