Logic fixed, io package created.