Remove unused test
Rearrange reader loop
Don't close on delete (use 'with')