Use liftIO instead of unsafePerformIO