Moving IO stuff to Utils