Added exceptions

Added a rollback after a failed commit. 
( Might be intensive, but would fix the current issues. )

This should fix issue #41