added options to exec, sanity check for arguments