diff --git a/headers/client.h b/headers/client.h
index 3523ef1fcd95137291140acf9d805ab98e80eb48..e960dfa4162fd21287f2b392b7950b3554f0550e 100644
--- a/headers/client.h
+++ b/headers/client.h
@@ -111,6 +111,7 @@ int client::send_frame_socket(frame *f) {
   return 1;
 }
 
+
 // Inicia a transmissao com o servidor
 int client::start_transmission() {
   cout << "\tIniciando transmissao\n";
@@ -230,6 +231,7 @@ vector<char> client::read_file(string fileName) {
   return fileData;
 }
 
+
 /**
  * @brief Send a file through the socket
  *
diff --git a/headers/server.h b/headers/server.h
index d45e9e691d81c0b0139d4519c52740907393f207..e2e76cba2e6cbb37b6c3fa4793ae719e0bb7da4c 100644
--- a/headers/server.h
+++ b/headers/server.h
@@ -23,6 +23,7 @@
 // include local
 #include "conexao.h"
 #include "frame.h"
+#include "cores.h"
 
 #define FILE_DESTINATION "./received"
 
@@ -195,7 +196,7 @@ bool server::create_received_dir() {
   }
 
   // create the directory
-  if (mkdir(FILE_DESTINATION, 0700) == -1) {
+  if (mkdir(FILE_DESTINATION, 0777) == -1) {
     cout << "Erro ao criar o diretorio\n";
     return false;
   }
@@ -263,16 +264,22 @@ int server::receive_file_data(string fileName) {
   fileDestination.push_back('/');
   fileDestination.append(fileName);
 
+  cout << BOLDGREEN << "Criando arquivo " << BOLDYELLOW << fileDestination
+       << BOLDGREEN << ". Digite novo nome ou enter para continuar: " << RESET;
+
+  string newDestination = "";
+  getline(cin, newDestination);
+  if(!newDestination.empty() && newDestination != "\n" ) { fileDestination = newDestination; }
+  cout << YELLOW << "Criando arquivo: " << fileDestination << "\n" << RESET;
+            
   // Abre o arquivo para escrita
   ofstream file;
   file.open(fileDestination, ios::binary);
   if (!file.is_open()) {
-    cout << "Falha ao criar o arquivo. Abortado\n";
+    cout << RED << "\tFalha ao criar o arquivo. Abortado\n" << RESET;
     return 0;
   }
 
-  cout << "Arquivo criado com sucesso\n";
-
   int lastSeq = 1;
   frame *f;
 
@@ -282,7 +289,12 @@ int server::receive_file_data(string fileName) {
 
     // Fica tentando receber um frame
     f = receive_frame_socket();
-    if (f == NULL) { return 0; }
+    if (f == NULL) {
+      cout << "Erro ao receber dados do arquivo";
+      file.close();
+      remove(fileDestination.c_str());
+      return 0;
+    }
 
     cout << "Frame recebido\n";
     f->imprime(HEX);
@@ -329,11 +341,11 @@ void server::receive_midia(frame *f) {
   if (fileName.size() == 0) { return; }
 
   if ( !receive_file_data(fileName) ) {
-    cout << "Falha ao receber o arquivo\n";
+    cout << RED << "\tFalha ao receber o arquivo\n" << RESET;
     return;
   }
 
-  cout << "Arquivo recebido com sucesso\n";
+  cout << GREEN << "\tArquivo recebido com sucesso\n" << RESET;
 }
 
 // Recebe um frame do cliente