Better checks for existing package
Fix package support for url