write log to txt file;upload the pics as sorted