Don't use Document for getting current path