Resolve error messages format bug

This commit resolves the error message format which was not good