Fixed a null pointer exception when removing resources with missing files

Resolves #259
Added centralized code to prevent stack traces in cases where the client cancels the communication

Resolves #260