variablized the filename in save_pic function