Simplify code. #mania
Close streams when deleting.