Revert "Some optimization and hide error reporting"

This reverts commit 447179d1a79d42bdf0ad31f8516085028dc08b0b.