Get rid of unsafePerformIO in main