preserving last directory