Fixed bug with delete creating superfluous files