get all file content before sending response