NPE while closing streams