properly close reader