Move fixing files functionality to tools