better handling when removing files #21