added rm and fixed a bug that was skipping error messages