changed pid argument o string (path to file)