Improved error handling

Swish!