public static File createFile(String filename, String fileData) throws HyscaleException {
		if (StringUtils.isBlank(filename)) {
			throw new HyscaleException(CommonErrorCode.FAILED_TO_WRITE_FILE_DATA);
		}
		File file = createEmptyFile(filename);
		if (StringUtils.isBlank(fileData)) {
			logger.debug("Created empty file {}", filename);
			return file;
		}

		try (FileWriter fileWriter = new FileWriter(file)) {
			fileWriter.write(fileData);
		} catch (IOException e) {
			throw new HyscaleException(e, CommonErrorCode.FAILED_TO_WRITE_FILE, filename);
		}
		return file;
	}
Create file in required directory

@param filename
@param fileData
@throws HyscaleException
commons/src/main/java/io/hyscale/commons/io/HyscaleFilesUtil.java