Export functie implemented
import > inputstream now gets closed at the end