saving images and text files, checking connection