Better error handling, started the big bug hunt