more robust error handling on git push hook