@Override
	public void cleanup() {
		if(transferState != TransferStatus.Finished &&targetFile != null && targetFile.exists())
			targetFile.delete();
		if(transferState == TransferStatus.Cleaned) {
			logger.log(Level.WARNING, "transfer is already cleaned!");
			return;
		}
		super.cleanup();
		sourceFile = null;

		try {
			if (targetFilestream != null)
				targetFilestream.close();
		} catch (IOException e) {
			logger.warning("Could not close target filestream: " + e.getMessage());
			e.printStackTrace();
		}

		try {
			if (socket != null)
				socket.close();
		} catch (IOException e) {
			logger.warning("Could not close socket: " + e.getMessage());
			e.printStackTrace();
		}
		
		if(self != null)
			self.interrupt();
		
		transferState = TransferStatus.Cleaned;
	}