fix bug in report generation (+ refactor)
allow zip files to be uploaded