Better error handling for FromLocal