Fcommand code into its own function

- throw if Factotum isn't enabled