Replace os with subprocess; Fix issue #10