use FileUtils instead of system method