impelement receive file method