Removing try/resources so that the stream is not closed and error handling is reported correctly
Changed the bean name to be more meaningful. Also added some simple tests but still getting NPE and needs further investigation.