Added FileService.close() method and implemented as required