removed debugging
improved delete performance by using pipes for copying between temp files