Added a function for reading integers from files.