added the possibilty to save pictures these will be saved in file