private String stackTraceString(Exception e){
		StringWriter stackString = new StringWriter();
		int depth = 0;
		for(StackTraceElement element : e.getStackTrace()){
			stackString.write("\t");
			for (int i = 0 ; i <= depth ; i++){
				stackString.write("   ");
			}
			stackString.write(element.getClassName() + ":" + element.getMethodName());
			if (element.getFileName() != null){
				stackString.write(" - in file " + element.getFileName());
			}
			
			stackString.write("\n");
			depth++;
		}
		
		return stackString.toString();
	}