run pre-command