Replace f.partition with f.replace so it builds on COS5