Changed using subprocess to os, for lack of dependencies