Image writing string concatenation fixed