Add a sync read file method for debugging.