Started to add basic error handling.