Changed filename to be optional when saving image