Get rid of $1 variable in catch all function, it gives error message 'unbound variable' on adding cartridge.