fix exception handling when File.unlink