public void upload( String source, String target )
	{
		try
		{
			String local = convertPath( source );
			String remote = convertPath( target );

			if ( isDirectory( local ) && !isDirectory( remote ) )
			{
				throw new IllegalStateException(
						"Can not send a directory to a file!" );
			}
			File f = new File( local );
			if ( !f.exists() )
			{
				throw new IllegalArgumentException( "File dose not exist!" );
			}
			Option[] options = getOptions( remote );

			scpSession.upload( local, remote, options );
			scpLog.logToConsole( source + " upload successfully!",
					LogCollector.INFO );
		}
		catch ( IllegalStateException e )
		{
			scpLog.logToConsole( "Can not send directory to a file!",
					LogCollector.ERROR );
			scpLog.logToConsole( e.getMessage(), LogCollector.ERROR );
		}
		catch ( IllegalArgumentException e )
		{
			scpLog.logToConsole( "File doesn't exist!", LogCollector.ERROR );
			scpLog.logToConsole( e.getMessage(), LogCollector.ERROR );
		}
		catch ( IOException e )
		{
			// TODO Auto-generated catch block
			scpLog.logToConsole( "Failed to upload files!", LogCollector.ERROR );
			scpLog.logToConsole( e.getMessage(), LogCollector.ERROR );
		}
	}