WIP: Don't use assert for handling errors