dropped java 1.7 restriction, falling back to older methods of reading files