Implement CPU limiting and fix minor issue when copying files