Wrote a new file copy method to remove Java 7 dependency.