Fixing unlink exception issue