Specify index in all {} format strings
Use subprocess.Popen instead of .check_output