Fixed new, file-type agnostic way of saving images