Revert "Remove prepare_command"

This reverts commit 3a8ae23f5542fc587dc5fe9d6d8a84d6ba6f67f4.
Remove prepare_command