refactor error messages
better print