trim input and removed exception swallow on GetProfile