Changed getContentIfFile to return null when file does not exist so that error gets thrown