Added optional config profile parameter.