Ya know, just a single return 0; at the end of readWriteFileContents would suffice, you don't need three of them.