Can you say more here, I don't have the context.
let file = file.expect("file was null");
That is, the "expect" method does exactly this. let file = file.unwrapOrPanicWith("file was null");
option.expect(message) doesn't semantically make sense.