fixed how file is read from server