use IOUtil which Jenkins offers