filter-branch: Add more error-handling