Optimizations

Removed unecessary error message generation