adding some utils that we use in several projects.

I wonder if UncheckedIOException is a better choice here.