Split this into multiple statements and use os.path.join instead of string formatting