Add commit-based commands to try block