Added a splintrc and checked the return value of close().