Add missing call to reader.close()