public function delete($filename)
    {
        $this->request->allowMethod(['post', 'delete']);

        $success = (new File($this->getPath($filename, false)))->delete();
        $serialized = $this->getPath($filename, true);

        //Deletes the serialized log copy, if it exists
        if (file_exists($serialized)) {
            $successSerialized = (new File($serialized))->delete();
        }

        if ($success && $successSerialized) {
            $this->Flash->success(I18N_OPERATION_OK);
        } else {
            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        return $this->redirect(['action' => 'index']);
    }