updated with check on commit message, exit if error