File correctly writes out