Read file correctly