fix issue where file is not of String type (TempFile)