Fix a small bug in opening file.