added creat_file method and send_email method