odd that this works, if we refactor the reading in of streams in this class then getfile should return a resource