Fixing broken saving

All thanks to better error reporting!