Updated input.d with better error messages.