Changed from console log to sendfile