replace mega ugly hack for Choose File dialog