Replace system calls with FileUtils