Modified tool.py with separate read, write and ask functions.