Fix incorrect usage of NewWithFilename