Avoid keeping the resource mounted because of some failure

solution for "device or resource busy" error