Quick change to use java 7 read file attributes
Added support for java7 read file attributes.

Contains error detection