extract command to separate file