Get real package directory
Improved diagnostics