Checks if packageExplorer is not null before deleting projects

Adds debug messages to help findout what goes wrong on MS Windows somretim