Prevent fatal when File::transform() returns false

Bug: 58128
Change-Id: I115affb472bba99268575834de8cbf2d0318a32e