Added method for reading files and block display error