Fixed typo
Added regexp-related assertions
Pass more debug information to assertion