Add some simple error handling...