Improved file reading test